﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Lincolnwood.Foundation.Common.Data.NHibernate;
using NHibernate;
using NHibernate.Cfg;

namespace Lincolnwood.Foundation.SermonLibrary.Data.NHibernate
{
    public class NHibernateSermonLibraryUnitOfWork : NHibernateUnitOfWork
    {

        public NHibernateSermonLibraryUnitOfWork() : base()
        {
            Helper.ConfigureWith(typeof(NHibernateSermonRepository).Assembly);
            Session = Helper.OpenSession();
        }

        public override Configuration AddConfiguration(Configuration config)
        {
            return config.AddAssembly(typeof(NHibernateSermonRepository).Assembly);
        }

    }
}
